<?php
class ebase
{
	var $db;
	function __construct()
	{
		app::load(ROOT."/config.php");
		app::load(ROOT."/class/mysql.class.php"); 
		app::load(ROOT."/include/security.inc.php");
		$this->init_db();  
	}
	function  __destruct()
	{
		
	}
	/**
	 * 打开MYSQL链接
	 */
	function init_db() {
		$this->db = new emysql();
		$this->db->connect($GLOBALS['cfg']['DB_HOST'], $GLOBALS['cfg']['DB_USER'], $GLOBALS['cfg']['DB_PASS'], $GLOBALS['cfg']['DB_NAME'],$GLOBALS['cfg']['DB_CHARSET'],$GLOBALS['cfg']['DB_PCONNECT']); 
	}
}
?>